#include "Loading.h"

SleepTask task;

void Loading::init()
{
	view->init();
	initStatus = true;
	defaultEventLoopService.addTask(&task);
}

void Loading::active()
{	
}

void Loading::execute()
{
	view->show(); 
	view->setText("Loading Configuration...");
	configService.loadConfig();
	view->setText("Initializing Network...");
	wifiService.init();
	view->setText("Initializing Services...");
	powerService.init();
	i2cEventLoopService.addTask([&](void) {
		gestureService.init();
	});
	switchApp(APP_HOME);
}